#include "CTween.h"

Int32 CALLBACKTYPE GetLinearValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType)
{
    assert(elaspedTime <= durationTime);

    Int64 dx = ((Int64)(toValue - fromValue)) << VALUE_FICTION;
    Int64 delta = dx * elaspedTime / durationTime;

    return fromValue + (Int32)(delta >> VALUE_FICTION);
}
